// LGUIFrame.cpp: implementation of the LGUIFrame class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "LGUIFrame.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

LGUIFrame::~LGUIFrame()
{

}


void LGUIFrame::draw(int xoff, int yoff)
{
  if (isDirty)
  {
    buffer.rect(x+xoff,y+yoff,x+xoff+w-1,y+yoff+h-1,COLOR(0x808080));
    buffer.rectFill(x+xoff+1,y+yoff+1,x+xoff+w-1,y+yoff+12, COLOR(0xFFFFFF));
    buffer.drawText(caption,x+xoff+3,y+yoff+3);
	buffer.hLine(x+xoff,y+yoff+13,x+xoff+w-1,COLOR(0x808080));
    buffer.addDirtyRect(*this);
    isDirty=false;
  }
  LGUIContainer::draw(xoff, yoff);
}